<html>
<head>
    <script src="../../OLLoader.js"></script>
    <script src="v1_0_0.js"></script>
    <script type="text/javascript">

    function test_read(t) {

        t.plan(7);

        var format = new OpenLayers.Format.WPSCapabilities();
        var obj = format.read(doc);

        t.eq(obj.version, "1.0.0", "Version parsed correctly");

        t.eq(obj.languages.length, 2, "2 language entries parsed");
        t.eq(obj.languages[0].isDefault, true, "First language is the default language");
        t.eq(obj.languages[0].language, "en-US", "First language is US English");

        var buffer = obj.processOfferings["JTS:buffer"];
        t.eq(buffer.processVersion, "1.0.0", "processVersion for buffer is 1.0.0");
        t.eq(buffer.abstract, "Buffers a geometry using a certain distance", "Buffer abstract correctly read");
        t.eq(buffer.title, "Buffers a geometry using a certain distance", "Buffer title correctly read");
    }

    </script>
</head>
<body>
</body>
</html>
